<?php
    /* @var $this PageController */
    /* @var $model Page */

    $this->breadcrumbs = array(
        'Pages' => array('index'),
        'Manage',
    );

    $this->menu = array(
        array('label' => 'List Page', 'url' => array('index')),
        array('label' => 'Create Page', 'url' => array('create')),
    );

    Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#page-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h3>Quản lý bài viết</h3>
<div class="row-fluid">
    <div class="span12">
        <ul class="quick-actions-horizontal pull-left">
            <li>
                <a href="<?php echo Yii::app()->createAbsoluteUrl('page/create'); ?>">
                    <i class="icon-plus"></i>
                    <span>Thêm bài viết</span>
                </a>
            </li>
        </ul>
    </div>
</div>
<?php $this->widget('zii.widgets.grid.CGridView', array(
    'id'           => 'page-grid',
    'dataProvider' => $model->search(),
    'filter'       => $model,
    'columns'      => array(
        'id',
        'url',
        'title',
        array(
            'class' => 'CButtonColumn',
        ),
    ),
)); ?>
